<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const cat={
            name:'狸花猫',
            food:'什么都吃',
            color:'花色',
            friend:['布偶','银渐层']
        }
        for (const key in cat) {
            // 通过cat[key]遍历数组拿到数据
            console.log(cat[key])
            }
    </script>
</body>
</html>